home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1996 #6 / Amiga Plus CD - 1996 - No. 06.iso / pd / texte / texfontinst / contrib / helminck / zmtmacs.tex < prev   
Text File  |  1996-07-30  |  24KB  |  708 lines

  1. %%% This is file `zmtmacs.sty', version <1.0a> 
  2. %%% 
  3. %%% Copyright (C) 1994 Aloysius G. Helminck. All rights reserved. 
  4. %%% Permission is granted to to customize the declarations in this 
  5. %%% file to serve the needs of your installation. However, no permission
  6. %%% is granted to distribute a modified version of this file under 
  7. %%% its original name. 
  8. %%%
  9. %%% This file is a modification of the MTMACS.TEX file from Michael Spivak 
  10. %%% of the TEXPLORATORS CORPORATION, to be able to use the virtual mathtime
  11. %%% fonts with plain tex. I also used parts from the file "mathtime.tex"
  12. %%% from Adam H. Lewenberg.
  13. %%
  14. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  15.  
  16. % Save the catcodes of @ and ". (From Michal Jaegermann)
  17. \xdef\recoveratcodezzzz{\catcode`\noexpand\@=\the\catcode`\@}
  18. \xdef\recoverquotecodezqrz{\catcode`\noexpand\"=\the\catcode`\"}
  19. \catcode`\@=11
  20. \let\true@special=\special
  21. \def\special{\catcode`\_=8 \special@}
  22. \def\special@#1{\true@special{#1}\catcode`\_=\active}
  23. \catcode`\"=12
  24. %
  25. %%
  26. %%    Define some \newif's.
  27. %%
  28. \newif\ifAMSTEXloaded
  29. \newif\ifAMSPPTloaded
  30. %
  31. \expandafter\ifx\csname amsppt.sty\endcsname\relax
  32.      \AMSPPTloadedfalse\else\AMSPPTloadedtrue\fi
  33. %
  34. \ifx\amstexloaded@\relax\AMSTEXloadedtrue\else\AMSTEXloadedfalse\fi
  35. %%
  36. \mathchardef\varGamma="0100
  37. \mathchardef\varDelta="0101
  38. \mathchardef\varTheta="0102
  39. \mathchardef\varLambda="0103
  40. \mathchardef\varXi="0104
  41. \mathchardef\varPi="0105
  42. \mathchardef\varSigma="0106
  43. \mathchardef\varUpsilon="0107
  44. \mathchardef\varPhi="0108
  45. \mathchardef\varPsi="0109
  46. \mathchardef\varOmega="010A
  47. \ifx\amstexloaded@\relax
  48. \mathchardef\varkappa="017E
  49. \fi
  50.  
  51. \mathchardef\comp="2242
  52. \def\widebar{\mathaccent"0253 }
  53. %%
  54. %% For Textures fonts we need to redefine the \AA macro for Plain and LaTeX. 
  55. %% the macros depend on the size of the box for the CM ring character
  56. %% to be much wider than just the width of the ring. The times-roman
  57. %% character is quite small and will offset the ring far to the left.
  58. %% we adjust the size of the box for the ring to be placed in so that
  59. %% it works "reasonably well" for roman, italic, and bold versions.
  60. %\def\AA{\leavevmode\setbox0\hbox{A}\dimen@\ht0\advance\dimen@-0.85ex%
  61. %  \rlap{\raise.67\dimen@\hbox to \wd0{\hss\char'27\hss}}A}
  62. \def\hbar{{\mathchar'26\mkern-6.7muh}}
  63. \def\angle{{\vbox{\ialign{$\m@th\scriptstyle##$\crcr
  64.      \not\mathrel{\mkern14mu}\crcr
  65.      \noalign{\nointerlineskip}
  66.      \mkern2.5mu\leaders\hrule height.34pt\hfill\mkern2.5mu\crcr}}}}
  67.  
  68. \ifx\amstexloaded@\relax
  69.  \def\varinjlim{\mathop{\vtop{\ialign{##\crcr
  70.   \hfil\the\textfont\z@ lim\hfil\crcr
  71.   \noalign{\nointerlineskip}\rightarrowfill\crcr
  72.   \noalign{\nointerlineskip\kern-\ex@}\crcr}}}}
  73.  \def\varprojlim{\mathop{\vtop{\ialign{##\crcr
  74.   \hfil\the\textfont\z@ lim\hfil\crcr
  75.   \noalign{\nointerlineskip}\leftarrowfill\crcr
  76.   \noalign{\nointerlineskip\kern-\ex@}\crcr}}}}
  77.  \def\varliminf{\mathop{\underline{\vrule height\z@ depth.2ex width\z@
  78.   \hbox{\the\textfont\z@ lim}}}}
  79.  \def\varlimsup{\mathop{\overline{\hbox{\the\textfont\z@ lim}}}}
  80.  \def\spdot{^{\hbox{\raise\ex@\hbox{\the\textfont\z@.}}}}
  81.  \def\spddot{^{\hbox{\raise\ex@\hbox{\the\textfont\z@..}}}}
  82.  \def\spdddot{^{\hbox{\raise\ex@\hbox{\the\textfont\z@...}}}}
  83.  \def\spddddot{^{\hbox{\raise\ex@\hbox{\the\textfont\z@....}}}}
  84. \fi
  85. \ifx\amstexloaded@\relax
  86.  \mathchardef\dotacc"0250
  87.  \def\dddot@#1#2{\setbox\z@\hbox{$#1#2$}\setbox\tw@\hbox{$#1\infty$}%
  88.   \dimen@\ht\tw@\ifdim\ht\z@<\dimen@\dimen@\ht\z@\fi
  89.   \setbox\tw@\hbox{$#1#2\mathchar"012D$}\dimen@ii\wd\tw@
  90.   \advance\dimen@ii-\wd\z@ 
  91.   \setbox\z@\hbox{$#1\rhook$}\advance\dimen@ii-\wd\z@
  92.   \vbox{\offinterlineskip\ialign{\hfil$#1##$\hfil\cr
  93.    \kern\dimen@ii\dotacc\mkern-2.5mu\dotacc\mkern-2.5mu\dotacc\cr
  94.    \noalign{\vskip-\dimen@}#2\cr}}}
  95.  \def\dddot{\mathpalette\dddot@}
  96.  \def\ddddot@#1#2{\setbox\z@\hbox{$#1#2$}\setbox\tw@\hbox{$#1\infty$}%
  97.   \dimen@\ht\tw@\ifdim\ht\z@<\dimen@\dimen@\ht\z@\fi
  98.   \setbox\tw@\hbox{$#1#2\mathchar"012D$}\dimen@ii\wd\tw@
  99.   \advance\dimen@ii-\wd\z@ 
  100.   \setbox\z@\hbox{$#1\rhook$}\advance\dimen@ii-\wd\z@
  101.   \vbox{\offinterlineskip\ialign{\hfil$#1##$\hfil\cr
  102.    \kern\dimen@ii\dotacc\mkern-2.5mu\dotacc\mkern-2.5mu\dotacc
  103.     \mkern-2.5mu\dotacc\cr
  104.    \noalign{\vskip-\dimen@}#2\cr}}}
  105.  \def\ddddot{\mathpalette\ddddot@}
  106. \fi
  107. \newcount\uproot@
  108. \newcount\leftroot@
  109. \ifx\amstexloaded@\relax\else  
  110.  \def\nonmatherr@#1{\errmessage{\noexpand#1allowed only in math mode}}
  111. \fi
  112. \def\uproot#1{\relax\ifmmode\uproot@#1\relax\else\nonmatherr@\uproot\fi}
  113. \def\leftroot#1{\relax\ifmmode\leftroot@#1\relax\else\nonmatherr@\leftroot\fi}
  114. \def\root#1\of#2{\setbox\rootbox\hbox{$\m@th\scriptscriptstyle{#1}$}%
  115.  \mathpalette\r@@t{#2}}
  116. \def\r@@t#1#2{\setbox\z@\hbox{$\uproot@\z@\leftroot\z@\m@th#1\sqrt{#2}$}%
  117.  \dimen@\ht\z@\advance\dimen@-\dp\z@
  118.  \dimen@ii\dimen@
  119.   \ifdim\dimen@>30\p@\advance\dimen@ii-\sixt@@n\p@\else
  120.   \ifdim\dimen@>24\p@\advance\dimen@ii-8\p@\else
  121.   \ifdim\dimen@>18\p@\advance\dimen@ii-6\p@\else
  122.   \ifdim\dimen@>12\p@\advance\dimen@ii-4\p@\else
  123.   \ifdim\dimen@>10\p@\advance\dimen@ii-\tw@\p@\fi\fi\fi\fi\fi
  124.  \setbox\tw@\hbox{$\m@th#1\mskip\uproot@ mu$}\advance\dimen@ii by1.667\wd\tw@
  125.  \mkern-\leftroot@ mu\mkern5mu\raise.6\dimen@ii\copy\rootbox
  126.  \mkern-8mu\mkern\leftroot@ mu\box\z@\leftroot\z@\uproot\z@}
  127. \def\space@.{\futurelet\space@\relax}
  128. \space@. %
  129. \expandafter\let\csname subscript character \string_\endcsname_
  130. \catcode`\_=\active
  131. \def_{\ifmmode\expandafter\sb@\else
  132.  \expandafter\csname subscript character \string_\endcsname\fi}
  133. \let\sb_
  134. \ifnum\catcode`\^^A=8 \catcode`\^^A\active\let^^A_\fi
  135. \def\sb@#1{\csname subscript character \string_\endcsname
  136.  {\futurelet\next\sb@@#1}}
  137. \def\sb@@{%
  138.  \ifx\next\space@\def\next@. {\futurelet\next\sb@@}\else
  139.   \def\next@.{%
  140.    \ifx\next j\mkern-\tw@ mu\else
  141.    \ifx\next f\mkern-\tw@ mu\else
  142.    \ifx\next p\mkern-\@ne mu
  143.    \fi\fi\fi}%
  144.  \fi
  145.  \next@.}
  146. %%
  147. \def\jadjust{\mkern-\tw@ mu}
  148. \ifx\laxread@\undefined\else\Nonexpanding_\fi  
  149. %%
  150. %% The following fontdefinitions are from mtmacs.tex
  151. %%
  152. \def\FONT@#1#2{\expandafter\ifx\csname#1#2\endcsname\relax
  153.  \expandafter\expandafter\expandafter\global
  154.   \expandafter\font\csname#1#2\endcsname=#1#2\fi
  155.  \def\next@{\let\next@}%
  156.  \expandafter\next@\csname#1#2\endcsname}
  157. \def\PSZ@{\edef\nextiii@{ at \the\dimen@}}
  158. %
  159. \def\MTEX#1{%
  160.  \dimen@#1\relax\PSZ@
  161.  \FONT@{MTEX}\nextiii@
  162.  \textfont\thr@@\next@
  163.  \scriptfont\thr@@\next@
  164.  \scriptscriptfont\thr@@\next@
  165.  \setbox\z@\hbox{\next@ B}\p@renwd\wd\z@
  166.  \ifx\amstexloaded@\relax
  167.   \buffer@\fontdimen13 \next@
  168.   \buffer\buffer@
  169. \fi}
  170. %
  171. \def\SIFS@#1{\def\next@##1##2 ##3\next@{\def\nextiv@{##1##2}}%
  172.  \edef\nextii@{\noexpand\next@#1\space\noexpand\next@}\nextii@}
  173. \def\MathRoman#1#2#3#4{%
  174.  \SIFS@{#1}%
  175.  \dimen@#2\relax\PSZ@
  176.  \FONT@\nextiv@\nextiii@\textfont\z@\next@
  177.  \dimen@#3\relax\PSZ@
  178.  \FONT@\nextiv@\nextiii@\scriptfont\z@\next@
  179.  \dimen@#4\relax\PSZ@
  180.  \FONT@\nextiv@\nextiii@\scriptscriptfont\z@\next@}
  181. \def\MathBold#1#2#3#4{%
  182.  \SIFS@{#1}%
  183.  \dimen@#2\relax\PSZ@
  184.  \FONT@\nextiv@\nextiii@\textfont\bffam\next@
  185.  \dimen@#3\relax\PSZ@
  186.  \FONT@\nextiv@\nextiii@\scriptfont\bffam\next@
  187.  \dimen@#4\relax\PSZ@
  188.  \FONT@\nextiv@\nextiii@\scriptscriptfont\bffam\next@}
  189. \def\MathItalic#1#2#3#4{%
  190.  \SIFS@{#1}%
  191.  \dimen@#2\relax\PSZ@
  192.  \FONT@\nextiv@\nextiii@\textfont\itfam\next@
  193.  \dimen@#3\relax\PSZ@
  194.  \FONT@\nextiv@\nextiii@\scriptfont\itfam\next@
  195.  \dimen@#4\relax\PSZ@
  196.  \FONT@\nextiv@\nextiii@\scriptscriptfont\itfam\next@}
  197. \def\MathOblique#1#2#3#4{%
  198.  \SIFS@{#1}%
  199.  \dimen@#2\relax\PSZ@
  200.  \FONT@\nextiv@\nextiii@\textfont\slfam\next@
  201.  \dimen@#3\relax\PSZ@
  202.  \FONT@\nextiv@\nextiii@\scriptfont\slfam\next@
  203.  \dimen@#4\relax\PSZ@
  204.  \FONT@\nextiv@\nextiii@\scriptscriptfont\slfam\next@}
  205. \def\alloc@@#1#2#3#4#5{\global\advance\count1#1by\@ne
  206.  \ch@ck#1#4#2\allocationnumber=\count1#1
  207.  \global#3#5=\allocationnumber}
  208. \def\MathBoldItalic#1#2#3#4{%
  209.  \ifx\bfitfam\undefined
  210.   \alloc@@8\fam\chardef\sixt@@n\bfitfam
  211.  \fi
  212.  \SIFS@{#1}%
  213.  \dimen@#2\relax\PSZ@
  214.  \FONT@\nextiv@\nextiii@\textfont\bfitfam\next@
  215.  \dimen@#3\relax\PSZ@
  216.  \FONT@\nextiv@\nextiii@\scriptfont\bfitfam\next@
  217.  \dimen@#4\relax\PSZ@
  218.  \FONT@\nextiv@\nextiii@\scriptscriptfont\bfitfam\next@\relax
  219.  \ifx\amstexloaded@\relax
  220.   \def\bolditalic{\relax\ifmmode\expandafter\bolditalic@\else
  221.    \expandafter\nonmatherr@\expandafter\bolditalic\fi}%
  222.   \def\bolditalic@##1{{\bolditalic@@{##1}}}%
  223.   \def\bolditalic@@##1{\fam\bfitfam\relax##1}%
  224.   \def\textdef@@##1{\textdef@##1\rm\textdef@##1\bf\textdef@##1\sl
  225.     \textdef@##1\it\textdef@##1\bfit}%
  226.  \else
  227.   \def\bfit{\fam\bfitfam}%
  228.  \fi}
  229. \def\Calligraphic#1#2#3{%
  230.  \ifx\Calfam\undefined
  231.  \alloc@@8\fam\chardef\sixt@@n\Calfam
  232.   \ifx\amstexloaded@\relax
  233.    \def\Cal@@##1{\noaccents@\fam\Calfam##1}%  
  234.   \else
  235.   \def\cal{\fam\Calfam}%                     
  236.   \fi
  237.  \fi
  238.  \SIFS@{#1}%
  239.  \FONT@\nextiv@\empty\textfont\Calfam\next@\skewchar\next@48
  240.  \SIFS@{#2}%
  241.  \FONT@\nextiv@\empty\scriptfont\Calfam\next@\skewchar\next@48
  242.  \SIFS@{#3}%
  243.  \FONT@\nextiv@\empty\scriptscriptfont\Calfam\next@\skewchar\next@48\relax}
  244. \def\MathPiSix#1#2#3#4{%
  245.  \ifx\MathPiSixfam\undefined
  246.   \alloc@@8\fam\chardef\sixt@@n\MathPiSixfam
  247.   \ifx\amstexloaded@\relax\else
  248.    \def\Bbb{\relax\ifmmode\expandafter\Bbb@\else
  249.     \expandafter\nonmatherr@\expandafter\Bbb\fi}%
  250.    \def\Bbb@##1{{\Bbb@@{##1}}}%
  251.   \fi
  252.  \def\Bbb@@##1{\noaccents@\fam\MathPiSixfam##1}%
  253.  \fi
  254.  \SIFS@{#1}%
  255.  \dimen@#2\relax\dimen@.95\dimen@\PSZ@
  256.  \FONT@\nextiv@\nextiii@\textfont\MathPiSixfam\next@
  257.  \dimen@#3\relax\dimen@.95\dimen@\PSZ@
  258.  \FONT@\nextiv@\nextiii@\scriptfont\MathPiSixfam\next@
  259.  \dimen@#4\relax\dimen@.95\dimen@\PSZ@
  260.  \FONT@\nextiv@\nextiii@\scriptscriptfont\MathPiSixfam\next@}
  261. \def\MathPiTwofrak#1#2#3#4{%
  262.  \ifx\MathPiTwofrakfam\undefined
  263.   \alloc@@8\fam\chardef\sixt@@n\MathPiTwofrakfam
  264.   \ifx\amstexloaded@\relax\else
  265.    \def\frak{\relax\ifmmode\expandafter\frak@\else
  266.     \expandafter\nonmatherr@\expandafter\frak\fi}%
  267.    \def\frak@##1{{\frak@@{##1}}}%
  268.    \let\goth\frak
  269.   \fi
  270.  \fi
  271.  \def\frak@@##1{\fam\MathPiTwofrakfam\relax##1}%
  272.  \SIFS@{#1}%
  273.  \dimen@#2\relax\dimen@.88\dimen@\PSZ@
  274.  \FONT@\nextiv@\nextiii@\textfont\MathPiTwofrakfam\next@
  275.  \dimen@#3\relax\dimen@.88\dimen@\PSZ@
  276.  \FONT@\nextiv@\nextiii@\scriptfont\MathPiTwofrakfam\next@
  277.  \dimen@#4\relax\dimen@.88\dimen@\PSZ@
  278.  \FONT@\nextiv@\nextiii@\scriptscriptfont\MathPiTwofrakfam\next@}
  279. \def\hexnumber@#1{\ifcase#1 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or 8\or
  280.  9\or A\or B\or C\or D\or E\or F\fi}
  281. \def\MathPiTwoScript#1#2#3#4{%
  282.  \ifx\MathPiTwoScriptfam\undefined
  283.   \alloc@@8\fam\chardef\sixt@@n\MathPiTwoScriptfam
  284.   \edef\MathPiTwoScriptfam@{\hexnumber@\MathPiTwoScriptfam}%
  285.   \def\Script{\relax\ifmmode\expandafter\Script@\else
  286.    \expandafter\nonmatherr@\expandafter\Script\fi}%
  287.   \def\Script@##1{{\Script@@{##1}}}%
  288.   \def\Script@@##1{\noaccents@
  289.    \count@=`##1\advance\count@-65 
  290.    \edef\next@{\ifcase\count@21\or40\or23\or24\or25\or5E\or
  291.          26\or2A\or28\or29\or5F\or2B\or7D\or31\or32\or33\or34\or35\or
  292.          36\or37\or38\or39\or30\or2D\or3D\or5D\fi}%
  293.    \mathchar"0\MathPiTwoScriptfam@\next@\relax}%
  294.  \fi
  295.  \SIFS@{#1}%
  296.  \dimen@#2\relax\dimen@.95\dimen@\PSZ@
  297.  \FONT@\nextiv@\nextiii@\textfont\MathPiTwoScriptfam\next@
  298.  \dimen@#3\relax\dimen@.95\dimen@\PSZ@
  299.  \FONT@\nextiv@\nextiii@\scriptfont\MathPiTwoScriptfam\next@
  300.  \dimen@#4\relax\dimen@.95\dimen@\PSZ@
  301.  \FONT@\nextiv@\nextiii@\scriptscriptfont\MathPiTwoScriptfam\next@}
  302.  
  303. % Make the catcode of @ a letter again. (The old version of mtmacs.tex
  304. % would fiddle with the catcode of @.)
  305. \catcode`\@=11
  306. %%%%%%%%%%%%%%%%%%%%%%
  307. %%
  308. %%  In the following we define the fontfamilies. Here we follow mathtime.tex
  309. %%
  310. %%%%%%%%%%%%%%%%%%%%%%
  311. %%       Math fonts
  312. %%       Example of use:
  313. %%
  314. %%          \mathitalic{zmtmi}{10pt}{9pt}{8pt}{7pt}{6pt}{5pt}
  315. %%          \mathsymbols{zmtsy}{10pt}{9pt}{8pt}{7pt}{6pt}{5pt}
  316. %%          \mathextension{10pt}{9pt}{8pt}{7pt}{6pt}{5pt}
  317. %%
  318. %
  319. % family 1  (uses ZMTMI or any of the other mathitalics fonts.)
  320. \def\mathitalic#1#2#3#4#5#6#7{
  321.   \font\teni=#1 at #2  \skewchar\teni=45
  322.   \font\seveni=#1 at #5  \skewchar\seveni=45
  323.   \font\fivei=#1 at #7   \skewchar\fivei=45
  324. \textfont1=\teni \scriptfont1=\seveni \scriptscriptfont1=\fivei
  325.   \ifAMSPPTloaded
  326. %   \font\ninei=#1 at #3  \skewchar\ninei=45
  327.     \font\eighti=#1 at #4  \skewchar\eighti=45
  328.     \font\sixi=#1 at #6   \skewchar\sixi=45
  329.   \fi
  330. }
  331. %
  332. % family 2  (uses ZMTSY or any of the other mathsymbol fonts.)
  333. \def\mathsymbols#1#2#3#4#5#6#7{
  334.   \font\tensy=#1 at #2    \skewchar\tensy=48
  335.   \font\sevensy=#1 at #5  \skewchar\sevensy=48
  336.   \font\fivesy=#1 at #7   \skewchar\fivesy=48
  337. \textfont2=\tensy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy
  338.   \ifAMSPPTloaded
  339. %   \font\ninesy=#1 at #3  \skewchar\ninesy=48
  340.     \font\eightsy=#1 at #4  \skewchar\eightsy=48
  341.     \font\sixsy=#1 at #6   \skewchar\sixsy=48
  342.   \fi
  343. }
  344. %
  345. % family 3  (uses MTEX)
  346. \def\mathextension#1#2#3#4#5#6{
  347.   \MTEX{#1}
  348.   \font\tenex=\fontname\textfont\thr@@
  349.   \ifAMSPPTloaded
  350. %   \font\nineex=MTEX at #2
  351.     \font\sevenex=MTEX at #4
  352.     \font\eightex=MTEX at #3
  353.   \fi
  354. }
  355. %
  356. %%
  357. %%%%%%%%%%%%%%%%%%%%%%
  358. %%       Text fonts.
  359. %%       Example of use:
  360. %%
  361. %%       (The format is similar to the math fonts)
  362. %%           \Roman{zmtmr}{10pt}{9pt}{8pt}{7pt}{6pt}{5pt}
  363. %%           \Boldface{ptmrb}{10pt}{9pt}{8pt}{7pt}{6pt}{5pt}
  364. %%           \Italic{ptmri}{10pt}{9pt}{8pt}{7pt}{6pt}{5pt}
  365. %%           \Slant{ptmro}{10pt}{9pt}{8pt}{7pt}{6pt}{5pt}
  366. %%           \Typewriter{pcrb}{10pt}{9pt}{8pt}{7pt}{6pt}{5pt}
  367. %%           \CapsAndSmallCaps{ptmrc}{10pt}{9pt}{8pt}{7pt}{6pt}{5pt}
  368. %% 
  369. %% Each of these control sequences also defines a macro which defines
  370. %% the font they call. For example, \Roman{ptmr}..{} defines the macro
  371. %% \RomanFont to be ptmr. Thus, you can say things like
  372. %%
  373. %%            \font\bigtext=\RomanFont at 20pt 
  374. %%
  375. %% So, you can more easily change from one font style to another
  376. %% since \bigtext will not be a specific font but rather a large
  377. %% version of whatever the Roman font is. The macros so defined are: 
  378. %%
  379. %%            \RomanFont
  380. %%            \ItalicFont
  381. %%            \SlantFont
  382. %%            \BoldfaceFont
  383. %%            \TypewriterFont
  384. %%            \CapsAndSmallCapsFont
  385. %%
  386. %% The font defining  macros are all implemented ad-hoc because of the
  387. %% ad-hoc nature in which font families use fonts in the various macro
  388. %% packages. The following table spells this out.
  389. %%
  390. %% PLAIN
  391. %% fam  text    script  scriptscript
  392. %% 3    10      10      10
  393. %% 4    10      undef   undef
  394. %% 5    10      undef   undef
  395. %% 6    10      7       5
  396. %% 7    10      undef   undef
  397. %%
  398. %% AMSTEX
  399. %% fam  text    script  scriptscript
  400. %% 3    10      10      10
  401. %% 4    10      10      10
  402. %% 5    10      10      10
  403. %% 6    10      7       5
  404. %% 7    10      undef   undef
  405. %%
  406. %% AMSTEX+AMSPPT.STY
  407. %% fam  text    script  scriptscript
  408. %% 3    10      7       7
  409. %% 4    10      7       7
  410. %% 5    10      10      10
  411. %% 6    10      7       5
  412. %% 7    10      undef   undef
  413. %%
  414. %% LAMSTEX (same as AMSTEX)
  415. %% fam  text    script  scriptscript
  416. %% 4    10      10      10
  417. %% 5    10      10      10
  418. %% 6    10      7       5
  419. %% 7    10      undef   undef
  420. %%
  421. %
  422.  
  423. % family 0 (For this we use ZMTMR or any of the other mathroman fonts.)
  424. \def\Roman#1#2#3#4#5#6#7{
  425.  \font\tenrm=#1 at #2
  426.  \font\sevenrm=#1 at #5
  427.  \font\fiverm=#1 at #7
  428.  \textfont0=\tenrm \scriptfont0=\sevenrm 
  429.  \scriptscriptfont0=\fiverm
  430.  \ifAMSPPTloaded 
  431. %  \font\ninerm=#1 at #3
  432.    \font\eightrm=#1 at #4
  433.    \font\sixrm=#1 at #6
  434.  \fi
  435.  \edef\RomanFont{#1 }%
  436. }
  437. %
  438. % family 4
  439. \def\Italic#1#2#3#4#5#6#7{
  440.  \font\tenit=#1 at #2
  441.  \textfont4=\tenit
  442.  \ifAMSPPTloaded
  443.    \font\sevenit=#1 at #5
  444.    \scriptfont4=\sevenit
  445.    \scriptscriptfont4=\sevenit
  446. %  \font\nineit=#1 at #3
  447.    \font\eightit=#1 at #4
  448.  \else
  449.    \ifAMSTEXloaded
  450.      \scriptfont4=\tenit
  451.      \scriptscriptfont4=\tenit
  452.    \fi
  453.  \fi
  454.  \edef\ItalicFont{#1 }%
  455. }
  456. %
  457. % family 5
  458. \def\Slant#1#2#3#4#5#6#7{
  459.  \font\tensl=#1 at #2
  460.  \textfont5=\tensl
  461.  \ifAMSTEXloaded
  462.    \scriptfont5=\tensl
  463.    \scriptscriptfont5=\tensl
  464.  \fi
  465.  \ifAMSPPTloaded
  466. %  \font\ninesl=#1 at #3
  467.    \font\eightsl=#1 at #4
  468.  \fi
  469.  \edef\SlantFont{#1 }%
  470. }
  471. %
  472. % family 6
  473. \def\Boldface#1#2#3#4#5#6#7{
  474.  \font\tenbf=#1 at #2
  475.  \font\sevenbf=#1 at #5
  476.  \font\fivebf=#1 at #7
  477.  \textfont6=\tenbf \scriptfont\bffam=\sevenbf
  478.  \scriptscriptfont\bffam=\fivebf
  479.  \ifAMSPPTloaded
  480. %  \font\ninebf=#1 at #3
  481.    \font\eightbf=#1 at #4
  482.    \font\sixbf=#1 at #6
  483.  \fi
  484.  \edef\BoldfaceFont{#1 }%
  485. }
  486. %
  487. % family 7
  488. \def\Typewriter#1#2#3#4#5#6#7{
  489.  \font\tentt=#1 at #2
  490.  \textfont7=\tentt
  491.  \ifAMSPPTloaded
  492. %  \font\ninett=#1 at #3
  493.    \font\eighttt=#1 at #4
  494.  \fi
  495.  \edef\TypewriterFont{#1 }%
  496. }
  497. %
  498. % (no family)
  499. \def\CapsAndSmallCaps#1#2#3#4#5#6#7{
  500.  \font\tensmc=#1 at #2
  501. %\font\ninesmc=#1 at #3
  502.  \font\eightsmc=#1 at #4
  503. % If NOT in amsppt.sty define \sc
  504.  \ifAMSPPTloaded\else \def\sc{\tensmc}\fi
  505.  \edef\CapsAndSmallCapsFont{#1 }%
  506. }
  507. %
  508. %
  509. %%%%%%%%%%%%%%%%%%%%%%
  510. %%       AMSfonts
  511. %%       Example of use:
  512. %%           \AMSFonts{10pt}{9pt}{8pt}{7pt}{6pt}{5pt}
  513. %%
  514. %%       NOTE: Works with AmsTeX version 2.1 or later.
  515. %%
  516. %% I first define a generic AMSfont loading mechanism. 
  517. %% \AMSFontFamily{msa}{msam}{\msafam}{10pt}{9pt}{8pt}{7pt}{6pt}{5pt}
  518. %%      #1          msa = \font name prefix
  519. %%      #2         msam = file name prefix
  520. %%      #3      \msafam = family number
  521. %%      #4         10pt = textfont
  522. %%      #5          9pt = (for later use)
  523. %%      #6          8pt = \eightpoint textfont
  524. %%      #7          7pt = scriptfont
  525. %%      #8          6pt = \eightpoint textfont
  526. %%      #9          5pt = scriptscriptfont
  527. %%
  528. %
  529. %% Those who use the Blue Sky PostScript AMS fonts take note.
  530. %% The msam and msbm fonts in the PS versions come in 10, 7 and 5
  531. %% point sizes. If AMSPPT.STY is used we also need 8 and 6 point
  532. %% sizes. If you have use the PS versions of the AMS fonts you should
  533. %% have the lines:
  534. %%      \def\PSAMSFonts{TT}%  Blue Sky PS AMS fonts: True
  535. %%      %%\def\PSAMSFonts{TF}% Blue Sky PS AMS fonts: False
  536. %% in your AMSPPT.STY file. If you don't, do so NOW! Otherwise, the
  537. %% mathtime.tex macros will not work correctly. 
  538. %
  539. \def\ef@#1{\expandafter\font\csname #1\endcsname}
  540. \def\DefineAMSFontFamily#1#2#3#4#5#6#7#8#9{%
  541.   \ef@{ten#1}=#210 at #4
  542.   \ef@{seven#1}=#27 at #7
  543.   \ef@{five#1}=#25 at #9
  544.   \textfont#3=\csname ten#1\endcsname
  545.   \scriptfont#3=\csname seven#1\endcsname
  546.   \scriptscriptfont#3=\csname five#1\endcsname
  547.   \ifAMSPPTloaded
  548.     \if\PSAMSFonts
  549. %     \ef@{nine#1}=#210 at #5
  550.       \ef@{eight#1}=#27 at #6
  551.       \ef@{six#1}=#25 at #8
  552.     \else
  553. %     \ef@{nine#1}=#29 at #5
  554.       \ef@{eight#1}=#28 at #6
  555.       \ef@{six#1}=#26 at #8
  556.     \fi
  557.   \fi
  558. }
  559. %
  560. \def\AMSFonts#1#2#3#4#5#6{
  561.   \ifAMSTEXloaded
  562.     \ifx\loadmsam\empty
  563.       \DefineAMSFontFamily{msa}{msam}{\msafam}{#1}{#2}{#3}{#4}{#5}{#6}
  564.     \fi
  565.     \ifx\loadmsbm\empty
  566.       \DefineAMSFontFamily{msb}{msbm}{\msbfam}{#1}{#2}{#3}{#4}{#5}{#6}
  567.     \fi
  568.     \ifx\loadeufm\empty
  569.       \DefineAMSFontFamily{eufm}{eufm}{\eufmfam}{#1}{#2}{#3}{#4}{#5}{#6}
  570.     \fi
  571.     \ifx\loadeufb\empty
  572.       \DefineAMSFontFamily{eufb}{eufb}{\eufbfam}{#1}{#2}{#3}{#4}{#5}{#6}
  573.     \fi
  574.     \ifx\loadeusm\empty
  575.       \DefineAMSFontFamily{eusm}{eusm}{\eusmfam}{#1}{#2}{#3}{#4}{#5}{#6}
  576.     \fi
  577.     \ifx\loadbold\empty
  578.       \DefineAMSFontFamily{cmmib}{cmmib}{\cmmibfam}{#1}{#2}{#3}{#4}{#5}{#6}
  579.     \fi
  580.   \else\relax
  581.   \fi
  582.   \ifAMSPPTloaded
  583.   \else
  584.   \def\loadextrasizes@##1##2##3##4##5##6##7{%
  585.     \ifx\undefined##1%
  586.     \else
  587.       \addto\tenpoint{\textfont##1##3\scriptfont##1##5%
  588.          \scriptscriptfont##1##7}%
  589.       \addto\eightpoint{\textfont##1##4\scriptfont##1##6%
  590.          \scriptscriptfont##1##7}%
  591.     \fi
  592.   }%
  593.   \fi
  594. }
  595.  
  596. %%%%%%%%%%%%%%%%%%%%%%
  597. %%       Other fonts (Old Style Digits) [Uses a \newfam!]
  598. %%       Example of use:
  599. %%           \OldNumerals{ptmrc}{10pt}{9pt}{8pt}{7pt}{6pt}{5pt}
  600. %%
  601. %% The \OldNumerals macro assumes that the digits are in the normal
  602. %% place where numbers are found in a standard TeX font. If this is
  603. %% not the case, some VF hacking will be necessary. 
  604. %%
  605. %% In PLAIN and AMSTEX the old style digits are accessed by calling
  606. %% the math-italic family. Of course, the math-italic family is no
  607. %% longer appropriate, so a new font family has to be created. Since
  608. %% there are only 16 families, use this with care. Note also that
  609. %% mtmacs.tex undefines \oldnos (although for some strange reason
  610. %% \oldstyle is not touched). 
  611. %%
  612. %%         PLAIN:  \oldstyle
  613. %%        AMSTEX:  \oldnos
  614. %
  615. \edef\innernewfam{\expandafter\noexpand\csname newfam\endcsname}
  616. %
  617. \def\DEFoldnos{%
  618.   \def\oldnos##1{\RIfM@{\mathcode`\,="013B \fam\oldnumfam##1}\else
  619.   \leavevmode\hbox{$\m@th\mathcode`\,="013B \fam\oldnumfam##1$}\fi}
  620. }% a hack to get around \if.. \fi silliness. 
  621. %
  622. \def\OldNumerals#1#2#3#4#5#6#7{%
  623.   \ifx\oldnumfam\undefined
  624.     \innernewfam\oldnumfam % Define a \newfam only if \oldnumfam is
  625.   \fi                      % not yet defined. 
  626.   \font\tenoldnum=#1 at #2
  627.   \font\sevenoldnum=#1 at #5
  628.   \font\fiveoldnum=#1 at #7
  629.   \textfont\oldnumfam=\tenoldnum \scriptfont\oldnumfam=\sevenoldnum
  630.   \scriptscriptfont\oldnumfam=\fiveoldnum
  631.   \ifAMSTEXloaded
  632.     \DEFoldnos\let\DEFoldnos\undefined
  633.   \else
  634.     \def\oldstyle{\fam\oldnumfam \tenoldnum}
  635.   \fi
  636. }
  637. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  638. %% The logos (taken from texnames.sty v1.08 by Nelson Beebe)
  639. %%
  640. %% Normally, the logo for AMSTEX uses family 2 fonts in its definition,
  641. %% which of course will give garbage in the context of the MathTime
  642. %% fonts. In texnames.sty the AMSTEX logo uses \cal: in this case if
  643. %% \NewCalligraphic has been called with fonts other than the cmsy
  644. %% fonts, the logo will look odd. In other words, the only way to get
  645. %% the \AmSTeX logo to look the way it is supposed to look is to use
  646. %% \NewCalligraphic with the cmsy fonts. 
  647. %%
  648. %% So I have decided that mathtime.tex will make `fake' logos which do
  649. %% not use family 2 or \cal. If you want the real logos, you must call
  650. %% the \MakeLogos macro. If \NewCalligraphic has been called the
  651. %% \MakeLogos macro will use as definition for the logos the
  652. %% definitions from texnames.sty. If \NewCalligraphic has _not_ been
  653. %% called, then the logo macros remain faked. In the former case, if
  654. %% fonts other than the cmsy fonts are used in \NewCalligraphic, the
  655. %% logos may look wrong.
  656. %%
  657. % Define "fake" logos:
  658. %
  659. \ifAMSTEXloaded\def\AmSTeX{AMS\TeX}\fi% Fake it
  660. %
  661. \ifx\laxread@\undefined
  662. \else
  663.   \ifx\LamSTeX\undefined% Normally defined in paper.st
  664.   \else
  665.     \def\LamSTeX{LAMS\TeX}% Fake it. 
  666.   \fi
  667. \fi
  668. %
  669. \def\MakeLogos{% Definitions taken from texnames.sty, ver. 1.08
  670.   \ifx\Calfam\undefined
  671.   \else
  672.     \ifAMSTEXloaded
  673.       \def\AmSTeX{$\Cal A$\kern-.1667em\lower.5ex\hbox{$\Cal M$}%
  674.               \kern-.125em$\Cal S$-\TeX}% Will look funny if cmsy fonts
  675.                                         % not used in \NewCalligraphic.
  676.     \fi
  677.     \ifx\laxread@\undefined
  678.     \else
  679.       \ifx\LamSTeX\undefined
  680.       \else
  681.         \def\LamSTeX{L\raise.42ex\hbox{\kern-.3em\the\scriptfont\Calfam A}%
  682.                      \kern-.2em\lower.376ex\hbox{\the\textfont\Calfam M}%
  683.                      \kern-.125em {\the\textfont\Calfam S}-\TeX}%
  684.       \fi
  685.     \fi
  686.   \fi
  687. }%
  688. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  689. %% Accents
  690. \ifAMSTEXloaded
  691.   \def\D#1{{\accent"C7 #1}}  % Change the dot accent for postscript
  692.                              % fonts.
  693.   \makeacc@\dot{0C7}         % AMSTEX math accent definition.
  694. \else
  695.   \def\dot{\mathaccent"70C7 }% PLAIN math accent definition.
  696.   \def\.#1{{\accent"C7 #1}}
  697. \fi
  698. \def\H#1{{\accent"CD #1}}    % Fix Hungarian umlaut for PostScript fonts.
  699. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  700. %% 6. Finish up
  701. % Recover catcodes of @ and "
  702. % Set the characters @ and " back to their former selves.
  703. \recoverquotecodezqrz\let\recoverquotecodezqrz=\relax
  704. \recoveratcodezzzz\let\recoveratcodezzzz=\relax
  705. %
  706. \endinput
  707. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  708.